import { Platform } from 'react-native'
// import request from './request'
import { pxToDp, color } from './styleSheet'
// import * as config from './config'
import router from './router/router'
// import { toast, showLoading, hideLoading, alert, confirm, prompt } from '@/components/Modal/core'
import { env } from './env'
// import { dic, getDicLabel } from '@/dic'

const options = {
  env,
  router,
  pxToDp,
  color,
  wait: (time = 100) => new Promise((resolve) => setTimeout(resolve, time, null)),
  isAndroid: Platform.OS === 'android',
  isIos: Platform.OS === 'ios',
};

(global as any).$ = options

declare global {
  const $: typeof options
}

export {}
